var componentTabbarAddressBasePath = componentAddressBasePath+"/dhtmlxtabbar_pro";
var themeTabbarAddressBasePath = componentTabbarAddressBasePath;
if(themeAddr != '1'){ 
	themeTabbarAddressBasePath = 'theme/'+themeAddr+'/dhtmlx-style';
}

document.write('<link rel="stylesheet" type="text/css" href="'+themeTabbarAddressBasePath+'/dhtmlxtabbar.css">');
document.write('<script type="text/javascript" src="'+componentAddressBasePath+'/dhtmlxcommon.js"></script>');
document.write('<script src="'+componentTabbarAddressBasePath+'/dhtmlxtabbar.js"></script>');
document.write('<script src="'+componentTabbarAddressBasePath+'/dhtmlxcontainer.js"></script>');

function setTabbarSkin(tabbar,skin){
	tabbar.setSkin(skin || ("dhx_"+ getThemeAddrSuffix() ));
}
function setTabbarImagePath(tabbar,path){
	tabbar.setImagePath(path || (themeTabbarAddressBasePath+'/imgs/') );
}

function createTabbar(divId,divPosition,operateTabbar){
	tabbar = new dhtmlXTabBar(divId, divPosition);
	configTabbar(tabbar,operateTabbar);
}

function createTabbarFromDHXLayoutCell(cell,operateTabbar){
	tabbar = cell.attachTabbar();
	itemProgressOff(cell);
	configTabbar(tabbar,operateTabbar);
}

function configTabbar(tabbar,operateTabbar,skin){
	setTabbarSkin(tabbar,skin);
	setTabbarImagePath(tabbar);
	tabbar.setHrefMode("iframes-on-demand");
	operateTabbar(tabbar);
	tabbar.attachEvent("onSelect", function(id) {
	    return true;
	});
}